using UnityEngine;
using System.Collections;

public static class EventCenterService
{
	static EventDispatcher mEventDispatcher;
	
	public static void Initialize() 
	{
		mEventDispatcher = new EventDispatcher();
	}
	
	public static void addEventListener (string astrEventName, EventHandler listener)
	{
		mEventDispatcher.addEventListener(astrEventName, listener);
	}
	
	public static void removeEventListener (string astrEventName, EventHandler listener)
	{
		mEventDispatcher.removeEventListener(astrEventName, listener);
	}
	
	// scene -> stage -> global
	public static void dispatchEvent (BaseEvent e)
	{
		mEventDispatcher.dispatchEvent(e);
	}
	
	public static bool hasEventListener (string astrEventName)
	{
		if (mEventDispatcher.hasEventListener(astrEventName))
			return true;
		
		return false;
	}
}